<%--
  Created by IntelliJ IDEA.
  User: wh110
  Date: 2021/11/19
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="com.wyz.entity.UserInfo,java.util.List" %>
<%@ page import="com.wyz.entity.UserInfo" %>
<html>
<head>
    <title>Title</title>
    <style>
        tr td{
            text-align: center;
        }
    </style>
</head>
<body>

<%--获取绑定数据--%>
    <%
        List<UserInfo> list = (List<UserInfo>) request.getAttribute("list");
    %>
    <table border="1px" cellspacing="0px" align="center" width="60%" height="500px">
        <caption>学生信息展示</caption>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>手机</th>
            <th>生日</th>
            <th>邮箱</th>
            <th>操作</th>
        </tr>
<%--        遍历list集合--%>
        <%
            for (UserInfo ui : list) {%>
                <tr>
                   <td><%= ui.getId()%></td>
                   <td><%= ui.getName()%></td>
                   <td><%= ui.getPwd()%></td>
                   <td><%= ui.getSex()%></td>
                   <td><%= ui.getTel()%></td>
                   <td><%= ui.getBir()%></td>
                   <td><a href="delStuById?id=<%=ui.getId()%>">删除</a></td>
                </tr>
        <%}%>
    </table>
    <div style="width: 70%;height: 50px;position: absolute;margin: 30px auto">
        <a href="addStu.html" style="position: absolute; right:0px;top:  0px;">添加学生</a>

    </div>

</body>
</html>
